package com.crm.pojo;

import com.alibaba.fastjson.annotation.JSONField;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;


/**
 * The persistent class for the PURCHASE database table.
 * 
 */
@Entity
@NamedQuery(name="Purchase.findAll", query="SELECT p FROM Purchase p")
public class Purchase implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(initialValue = 1, allocationSize = 1,name="PURCHASE_PURID_GENERATOR", sequenceName="SEQ3")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="PURCHASE_PURID_GENERATOR")
	private Long purid;
	//联系人id
	@Column(name="CONTACT_ID")
	private Long contactId;
	//联系人姓名
	@Transient
	private String contactName;

	@Column(name="PUR_CHECK")
	private String purCheck;
	//经手人id
	@Column(name="PUR_USER_ID")
	private Long purUserId;
	//经手人姓名
	@Transient
	private String purUsername;
	//供应商/客户名称
	@Transient
	private String clientname;
	//供应商id
	@Column(name="CLIENTID")
	private Long clientId;

	@Column(name="PURCHASE_IS_DEL")
	private String purchaseIsDel;

	@Temporal(TemporalType.DATE)
	@JSONField(format = "yyyy-MM-dd")
	private Date purdate;

	@Transient
	@Temporal(TemporalType.DATE)
	@JSONField(format = "yyyy-MM-dd")
	private Date startpurdate;

	@Transient
	@Temporal(TemporalType.DATE)
	@JSONField(format = "yyyy-MM-dd")
	private Date endpurdate;

	@Temporal(TemporalType.DATE)
	@JSONField(format = "yyyy-MM-dd")
	private Date purexcepttime;

	@Transient
	@Temporal(TemporalType.DATE)
	@JSONField(format = "yyyy-MM-dd")
	private Date startpurexcepttime;

	@Transient
	@Temporal(TemporalType.DATE)
	@JSONField(format = "yyyy-MM-dd")
	private Date endpurexcepttime;

	private Double purmoney;

	private String purnumber;
	//采购产品明细id
	private Long purpdid;

	private Long purrid;

	private Long pursid;
	//采购状态
	private String purstatus;

	private String purtheme;

	private String remarks;

	public Purchase() {
	}

	public Date getStartpurdate() {
		return startpurdate;
	}

	public void setStartpurdate(Date startpurdate) {
		this.startpurdate = startpurdate;
	}

	public Date getEndpurdate() {
		return endpurdate;
	}

	public void setEndpurdate(Date endpurdate) {
		this.endpurdate = endpurdate;
	}

	public Date getStartpurexcepttime() {
		return startpurexcepttime;
	}

	public void setStartpurexcepttime(Date startpurexcepttime) {
		this.startpurexcepttime = startpurexcepttime;
	}

	public Date getEndpurexcepttime() {
		return endpurexcepttime;
	}

	public void setEndpurexcepttime(Date endpurexcepttime) {
		this.endpurexcepttime = endpurexcepttime;
	}

	public String getContactName() {
		return contactName;
	}

	public void setContactName(String contactName) {
		this.contactName = contactName;
	}

	public String getClientname() {
		return clientname;
	}

	public void setClientname(String clientname) {
		this.clientname = clientname;
	}

	public Long getClientId() {
		return clientId;
	}

	public void setClientId(Long clientId) {
		this.clientId = clientId;
	}

	public String getPurUsername() {
		return purUsername;
	}

	public void setPurUsername(String purUsername) {
		this.purUsername = purUsername;
	}

	public Long getPurid() {
		return this.purid;
	}

	public void setPurid(Long purid) {
		this.purid = purid;
	}

	public Long getContactId() {
		return this.contactId;
	}

	public void setContactId(Long contactId) {
		this.contactId = contactId;
	}

	public String getPurCheck() {
		return this.purCheck;
	}

	public void setPurCheck(String purCheck) {
		this.purCheck = purCheck;
	}

	public Long getPurUserId() {
		return this.purUserId;
	}

	public void setPurUserId(Long purUserId) {
		this.purUserId = purUserId;
	}

	public String getPurchaseIsDel() {
		return this.purchaseIsDel;
	}

	public void setPurchaseIsDel(String purchaseIsDel) {
		this.purchaseIsDel = purchaseIsDel;
	}

	public Date getPurdate() {
		return this.purdate;
	}

	public void setPurdate(Date purdate) {
		this.purdate = purdate;
	}

	public Date getPurexcepttime() {
		return this.purexcepttime;
	}

	public void setPurexcepttime(Date purexcepttime) {
		this.purexcepttime = purexcepttime;
	}

	public Double getPurmoney() {
		return this.purmoney;
	}

	public void setPurmoney(Double purmoney) {
		this.purmoney = purmoney;
	}

	public String getPurnumber() {
		return this.purnumber;
	}

	public void setPurnumber(String purnumber) {
		this.purnumber = purnumber;
	}

	public Long getPurpdid() {
		return this.purpdid;
	}

	public void setPurpdid(Long purpdid) {
		this.purpdid = purpdid;
	}

	public Long getPurrid() {
		return this.purrid;
	}

	public void setPurrid(Long purrid) {
		this.purrid = purrid;
	}

	public Long getPursid() {
		return this.pursid;
	}

	public void setPursid(Long pursid) {
		this.pursid = pursid;
	}

	public String getPurstatus() {
		return purstatus;
	}

	public void setPurstatus(String purstatus) {
		this.purstatus = purstatus;
	}

	public String getPurtheme() {
		return this.purtheme;
	}

	public void setPurtheme(String purtheme) {
		this.purtheme = purtheme;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

}